import React, { Component } from 'react';

import All from './All';
import Boys from './Boys';
import Girls from './Girls';

export default class Find extends Component {
  constructor(props) {
    super(props);
  }

  renderContent(url) {
    switch(url)
    {
      case '/find':
        return (
          <All
            token={this.props.token}
            userId={this.props.userId}
            pushTo={this.props.pushTo}
            color500={this.props.color500}
          />
        );
      case '/find/girls':
        return (
          <Girls
            token={this.props.token}
            userId={this.props.userId}
            pushTo={this.props.pushTo}
            color500={this.props.color500}
          />
        );
      case '/find/boys':
        return (
          <Boys
            token={this.props.token}
            userId={this.props.userId}
            pushTo={this.props.pushTo}
            color500={this.props.color500}
          />
        );
      default:
        return;
    }
  }

  render() {
  	return (
  	  <div>
        {this.renderContent(this.props.url)}
  	  </div>
  	);
  }
};